<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-10-20 14:13:45
         compiled from "H:\WebApplication\myconpany\sumi_mobile\application\views\user\saleorderdetail.html" */ ?>
<?php /*%%SmartyHeaderCode:27081562323b914e776-74624751%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f5dde157dbbed56b5fe232037dfdabe6430d87ac' => 
    array (
      0 => 'H:\\WebApplication\\myconpany\\sumi_mobile\\application\\views\\user\\saleorderdetail.html',
      1 => 1445321591,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '27081562323b914e776-74624751',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_562323b95c04b9_95938748',
  'variables' => 
  array (
    'orderinfo' => 0,
    '_SupplyOrderMean' => 0,
    '_orderDeliveryTypeMean' => 0,
    '_supplyOrderCfg' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_562323b95c04b9_95938748')) {function content_562323b95c04b9_95938748($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/header.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>



<!--content stop-->
<section class="box-user">

    <div class="my_tmt"><?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['cate_name'];?>
 <?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['product_name'];?>
  <?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['brand_name'];?>
 <span class="fr gray"><?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['update_time'];?>
</span></div>

    <div class="my_tms">
        <p class="pt10p">订 单 号：<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['order_key'];?>
</p>
        <p class="pt10p">状　　态：<span class="orange"><?php echo $_smarty_tpl->tpl_vars['_SupplyOrderMean']->value[$_smarty_tpl->tpl_vars['orderinfo']->value['status']];?>
 </span></p>
        <p class="pt10p">配送方式：<?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['delivery_method']!='') {
echo $_smarty_tpl->tpl_vars['_orderDeliveryTypeMean']->value[$_smarty_tpl->tpl_vars['orderinfo']->value['delivery_method']];
} else { ?>自提<?php }?></p>

        <?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['delivery_method']=='2') {?><p class="pt10p">配送地址： <?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['delivery_addr'];?>
</p><?php }?>

        <?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['status']==$_smarty_tpl->tpl_vars['_supplyOrderCfg']->value['audit']) {?>
        <p class="pt10p">单　　价：<input type="text" name="price" value="<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['price'];?>
" class="my_tms_input"/>元/吨</p>
        <p class="pt10p">数　　量：<input type="text" name="num" value="<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['num'];?>
" class="my_tms_input"/>吨</p>
        <?php } else { ?>
        <p class="pt10p">单　　价：<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['price'];?>
元/吨</p>
        <p class="pt10p">数　　量：<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['num'];?>
吨</p>
        <?php }?>
    </div>

    <div class="my_tms">
        <h3 class="gray" style="line-height: 35px; font-size: 14px; color: #333; font-weight: bold;">求购公司</h3>
        <p class="w5p">公司名称：<span class="orange"><?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['ibusiness_name']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['ibusiness_name'];
}?></span></p>
        <p class="pt10p">联 系 人 ：<?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['icontacts']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['icontacts'];
}?></p>
        <p class="pt10p">联系电话：<?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['imobile']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['imobile'];
}?></p>
    </div>

    <div class="my_tms">
        <h3 class="gray" style="line-height: 35px; font-size: 14px; color: #333; font-weight: bold;">报价公司</h3>
        <p class="w5p">公司名称：<span class="orange"><?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['business_name']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['business_name'];
}?></span></p>
        <p class="pt10p">联 系 人 ：<?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['contacts']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['contacts'];
}?></p>
        <p class="pt10p">联系电话：<?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['mobile']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['mobile'];
}?></p>
    </div>


    <div class="my_tms">
        <p class="w5p">备注：<span class="orange"><?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['remark']!='') {
echo $_smarty_tpl->tpl_vars['orderinfo']->value['remark'];
}?> </span></p>
    </div>

    <p class="my_tms_btn">
        <?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['status']==$_smarty_tpl->tpl_vars['_supplyOrderCfg']->value['audit']) {?>
        <a class="ConfirmOrder" href="javascript:void(0)" vid="<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['id'];?>
">确认订单</a>
        <?php }?>

        <?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['status']==$_smarty_tpl->tpl_vars['_supplyOrderCfg']->value['deal']) {?>
        <a class="upsupply" href="/user/salesorderdone/id/<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['id'];?>
" >交易完成</a>
        <?php }?>

        <?php if ($_smarty_tpl->tpl_vars['orderinfo']->value['status']==$_smarty_tpl->tpl_vars['_supplyOrderCfg']->value['audit']||$_smarty_tpl->tpl_vars['orderinfo']->value['status']==$_smarty_tpl->tpl_vars['_supplyOrderCfg']->value['deal']) {?>
        <a href="/user/saleordercancel/id/<?php echo $_smarty_tpl->tpl_vars['orderinfo']->value['id'];?>
" style="background: #999;">取消</a>
        <?php }?>

    </p>

</section>


<style>
    .spanmark{
        float: left;
        left: 63px;
        position: absolute;
        top: 14px;
        color: orange;
        z-index: 9999999;
    }
</style>
<?php echo '<script'; ?>
>
    $(function(){
        $(".ConfirmOrder").click(function(){

            var url  = "/user/confirorder";
            var id   = $(this).attr("vid");
            var price= $("input[name=price]").val();
            var num= $("input[name=num]").val();

            $.ajax({
                url:url,
                data:{id:id,price:price,num:num},
                type:'POST',
                success:function(data){
                    var data = eval("("+data+")");
                    var code = data.code;
                    var msg = data.msg;
                    if(code == 8){
                        alert(msg);
                        window.location.reload();
                        return true;
                    }else{
                        alert(msg);
                        return false;
                    }
                },
                dataType:'text'
            });

        });
    })

<?php echo '</script'; ?>
>

<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/common/footerlogin.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/footer.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php }} ?>
